package com.gcsoftware.web.beans.elasticsearchData;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

/**
 * bucket片段
 * @author czp
 * date : 2014
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Bucketz implements Serializable {
    @JsonProperty("es_api_name_groups")
    private Agg es_api_name_groups;

    @JsonProperty("key")
    private String key;

    @JsonProperty("doc_count")
    private long doc_count;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("es_api_name_groups", es_api_name_groups)
            .append("key", key)
            .append("doc_count", doc_count)
            .toString();
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Agg getEs_api_name_groups() {
        return es_api_name_groups;
    }

    public void setEs_api_name_groups(Agg es_api_name_groups) {
        this.es_api_name_groups = es_api_name_groups;
    }

    public long getDoc_count() {
        return doc_count;

    }

    public void setDoc_count(long doc_count) {
        this.doc_count = doc_count;
    }
}
